using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using FairyGUI;
using UnityEngine.Events;

public class SkillDetailWindow : Window
{
    GButton m_confirmBtn;
    GButton m_closeBtn;
    UnityAction confirmEvent;
    UnityAction cancelEvent;
    //string contentText = "";
    GTextField contentText;

    public SkillDetailWindow(string content="")
    {
        
       
    }

    protected override void OnInit()
    {
        this.contentPane = UIPackage.CreateObject("CommonPackage", "skillDetailInfo").asCom;
       
        //this.Center();
        this.modal = false;
        
        Debug.Log(this.contentText);
        //m_confirmBtn = contentPane.GetChild("confirmBtn").asButton;
        //m_confirmBtn.onClick.Add(OnConfirmEvent);
        //m_closeBtn = contentPane.GetChild("closeBtn").asButton;
        //m_closeBtn.onClick.Add(OnHidePanel);
    }

    void OnConfirmEvent()
    {
        confirmEvent();
    }


    void OnHidePanel()
    {
        Hide();
    }

    

    public void setText(string content="")
    {
       
        //this.contentText.text = content;
    }
}
